package com.founder.chd_daily_query.controller;

import com.founder.chd_daily_query.service.TraceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping({"/trace"})
public class TraceController {
    @Autowired
    TraceService traceService;

    public TraceController() {
    }
    //需求查询
    @RequestMapping("/track/{id}")
    public Object Tracer(@PathVariable("id") String demand_supplier_id) {
        return this.traceService.tracer(demand_supplier_id);
    }
    //需求详情
    @RequestMapping("/getDetail/{id}")
    public Map<String, List<Object>> getDetail(@PathVariable("id") String demand_supplier_id) {
        return this.traceService.getDetail(demand_supplier_id);
    }
    //合同查询
    @RequestMapping("/tracerViaContractId/{contractId}")
    public Object TracerViaContractCode(@PathVariable("contractId") String contractId){
        return traceService.tracerViaContractId(contractId);
    }
    //合同详情
    @RequestMapping("/getDetailViaContractId/{contractId}")
    public Map<String, List<Object>> getDetailViaContractCode(@PathVariable("contractId") String contractId) {
        return this.traceService.getDetailViaContractId(contractId);
    }

    //竞价查询
    @RequestMapping("/tracerViaBidId/{bidId}")
    public Object TracerViaBidCode(@PathVariable("bidId") String bidId){
        return traceService.tracerViaBidId(bidId);
    }
    //竞价详情
    @RequestMapping("/getDetailViaBidId/{bidId}")
    public Map<String, List<Object>> getDetailViaBidCode(@PathVariable("bidId") String bidId) {
        return this.traceService.getDetailViaBidId(bidId);
    }



}
